home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Amiga Amateur Radio User Group / AARUG UK #17 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].zip / AARUG UK #17 (199x)(Amiga Amateur Radio User Group UK)(PD)[WB][G4DCV].adf / IP.NetROM < prev    next >
Text File  |  1989-11-30  |  34KB  |  692 lines

  1. [The following paper has been submitted to the 7th ARRL Computer
  2.  Networking Conference.  You may read it and pass it on to others
  3.  to read, but please do not reproduce it in any other publication.
  4.  Copyright 1988 by Daniel M. Frank.]
  5.  
  6. [This is a DOS text version of a document originally produced
  7.  with a word processing program.  In the translation process,
  8.  some text formatting may have been disturbed, and the bold
  9.  facing has definitely been lost.  So, it may not scan quite
  10.  like the original.  Sorry.]
  11.  
  12.  
  13.        TRANSMISSION OF IP DATAGRAMS OVER NET/ROM NETWORKS
  14.  
  15.                       Daniel M. Frank, W9NK
  16.                         1802 Keyes Avenue
  17.                      Madison, WI 53711-2006
  18.  
  19.  
  20. ABSTRACT
  21.  
  22. One of the main design goals of the Internet Protocol was that IP
  23. datagrams could be carried over existing local- and wide-area
  24. networks.  This characteristic of IP makes it possible to build so
  25. called "internetworks" out of existing network facilities.  We
  26. built support for an existing Amateur wide area network, NET/ROM,
  27. into the KA9Q TCP/IP package, allowing the use of NET/ROM to carry
  28. IP datagrams, and adding features which make the KA9Q software
  29. useful as a full duplex NET/ROM packet switch.  We have also shown
  30. that NET/ROM may be used as a datagram network only, independent
  31. of its transport and application layer facilities.
  32.  
  33.  
  34. INTRODUCTION
  35.  
  36. In the late Seventies and early Eighties, the world of computer
  37. communications consisted of many isolated local- and wide-area
  38. networks.  Enough communications capacity existed to link the
  39. entire country, and much of the world, into a single large network,
  40. but the existing facilities were physically and logically
  41. dissimilar.  They could not simply be "plugged together" to make
  42. this large "internetwork" (or "Internet").
  43.  
  44. The designers of the Internet Protocol (the "IP" in "TCP/IP") were
  45. committed to overcoming the obstacles that prevented an Internet
  46. from developing.  They came up with two key ideas:
  47.  
  48.     o    Gateways can be established between networks.  A gateway
  49.           is a computer which possesses the physical resources and
  50.           software to connect with and speak to more than one kind
  51.           of network.
  52.  
  53.     o    A single protocol can be developed whose messages
  54.           ("datagrams") can pass through any network, hidden inside
  55.           that network's "native" messages.  When a message with
  56.           a datagram inside it encounters a gateway, the gateway
  57.           "unwraps" the datagram, rewraps it in the native message
  58.           of a second network, and sends it on its way.  If a
  59.           datagram is too large to fit inside the native message
  60.           type of a network, the gateway breaks it into pieces
  61.           ("fragments"), each of which is then wrapped in a native
  62.           message and sent on.
  63.  
  64. By using IP and gateways, the designers of the Internet have
  65. created a global "network of networks", which today encompasses
  66. hundreds of thousands of computer systems, connected to every
  67. conceivable kind of network.
  68.  
  69. Amateur packet radio networking, like computer networking, consists
  70. of many different network technologies and protocols.  Local AX.25
  71. communications, digipeating, TexNet, ROSE, and NET/ROM, to name
  72. only a few, coexist or compete for dominance as the network
  73. technology of choice.  This competition is healthy, and is in the
  74. spirit of amateur radio experimentation.  Any attempt to establish
  75. one network over another as the single "standard" is both pointless
  76. and doomed to failure.  No single standard can ever be imposed on
  77. radio amateurs any more than it could have been imposed on computer
  78. networks, given the investments already made in equipment,
  79. software, and education.
  80.  
  81. As the dissimilar amateur networks grow in size, they meet up with
  82. each other.  Sometimes they coexist on the same channels.  But
  83. without gateways and some kind of Internet Protocol, each network
  84. is an island of communication, unable to send or receive data
  85. beyond its own shores.
  86.  
  87. The work described in this paper is a first step towards true
  88. Amateur Radio internetworking.  Using the KA9Q TCP/IP package as
  89. a basis, we have built a software system which functions as a
  90. gateway between local TCP/IP networks and the NET/ROM network.  It
  91. allows IP datagrams to be forwarded automatically and transparently
  92. across existing NET/ROM facilities.  In addition, as a full
  93. implementation of NET/ROM layer 3, it is capable of functioning as
  94. a NET/ROM relay node (as opposed to an AX.25 endpoint), and as a
  95. full duplex NET/ROM packet switch.
  96.  
  97.  
  98. IP OPERATIONS OVER STANDARD AX.25 CONNECTIONS
  99.  
  100. In order to properly understand how we have interfaced to the
  101. NET/ROM network, we should first examine how "ordinary" TCP/IP
  102. operations take place over AX.25.  This description follows the ISO
  103. OSI Reference Model (RM), a seven-layer classification of network
  104. facilities.
  105.  
  106. From the bottom up, the layers used in packet TCP/IP operation are:
  107.  
  108.     (1)    A physical layer, made up of the radios, antennas, and
  109.           modems used to generate and carry the tones used to
  110.           convey digital data from one place to another.
  111.  
  112.     (2)    A data link layer, made up of HDLC and AX.25, used to
  113.           format and address the data, detect errors and discard
  114.           bad packets.  The link layer only knows about and
  115.           communicates with stations with which we are directly
  116.           connected.  In the case of packet radio, this means
  117.           stations with which we have reliable, direct
  118.           communications.  (Digipeating doesn't count, for purposes
  119.           of this discussion.)
  120.  
  121.     (3)    A network layer, responsible for routing packets to their
  122.           destinations through one or more link-to-link hops.  The
  123.           main distinction between the data link and network layers
  124.           is that the network layer provides facilities for
  125.           communication between stations not directly connected. 
  126.           The network layer has to have some concept of routing,
  127.           that is, the path to be taken by a packet to reach its
  128.           destination.  We use IP as our network protocol.
  129.  
  130.     (4)    A transport layer, responsible for reliable end-to-end
  131.           communications.  Our network layer does not guarantee
  132.           that a packet will actually reach its destination.  While
  133.           AX.25 provides link layer acknowledgement and
  134.           retransmission, it does not guard against nodes which go
  135.           down, software errors, or a destination station which is
  136.           not on the air.  The transport layer provides for an
  137.           acknowledgment to be sent from the packet's ultimate
  138.           destination, and for retries in case that acknowledgment
  139.           doesn't arrive within a reasonable amount of time.
  140.  
  141.         The other function of a transport layer is multiplexing. 
  142.           The network layer provides only host-to-host addressing. 
  143.           However, a computer can have many users, and provide many
  144.           different services.  The transport layer takes incoming
  145.           packets from the network and directs them to the proper
  146.           programs based on information contained in the transport
  147.           header portion of the packets.
  148.  
  149.         Our transport protocol is TCP, the Transmission Control
  150.           Protocol.
  151.  
  152.     (5)    The session layer is mainly involved with providing
  153.           services to individual programs within the computer.  It
  154.           is not of importance for the current discussion.
  155.  
  156.     (6)    The presentation layer is mainly concerned with the
  157.           uniform formatting of data, or its conversion between
  158.           different character sets.  Some of the TCP/IP user
  159.           programs have a very simple presentation "layer" which
  160.           maps plain text messages in the native character set of
  161.           the user's computer, to and from ASCII with a standard
  162.           line-ending convention.
  163.  
  164.     (7)    The application layer is made up of the various programs
  165.           and services that use networking facilities.  Users of
  166.           TCP/IP mainly make use of telnet, for keyboard to
  167.           keyboard chat and remote login, smtp for automated
  168.           transfer of mail, and ftp, for easy exchange of files.
  169.  
  170.  
  171.  
  172. LINK LAYER MULTIPLEXING
  173.  
  174. As can be seen from our description, local TCP/IP operation uses
  175. regular AX.25 communications for its link layer.  An AX.25 packet
  176. containing an IP datagram contains a special code in the protocol
  177. ID (PID) field of its header.  This allows the link layer software
  178. to forward the contents of the packet to the proper part of the
  179. KA9Q package, in this case the IP routing code.
  180.  
  181. If the AX.25 packet contained a PID of "no level 3", the link layer
  182. would forward it to a different part of the package, in this case
  183. the AX.25 session code, which allows users of the package to hold
  184. "regular" AX.25 conversations, bypassing all layers between the
  185. link and application layers.  (This brings up an important point
  186. about the reference model we've presented:  an implementation may
  187. not contain certain layers from the RM if the services they would
  188. have provided are unused or unneeded.)
  189.  
  190. This switching of packets at the link layer based on their PIDs is
  191. known as link layer multiplexing.  Multiplexing at the link layer
  192. is extremely useful, because it allows different network layer
  193. protocols to share the same data link services, and often the same
  194. link connections.  Link layer multiplexing is what allows the KA9Q
  195. software with NET/ROM support to act as a digipeater, an IP relay,
  196. and a NET/ROM relay node, all on the same channel, through the same
  197. TNC.
  198.  
  199.  
  200. AN OVERVIEW OF NET/ROM
  201.  
  202. Now that we understand how IP datagrams are carried over packet
  203. radio links, we should examine how NET/ROM operates.  Again, we
  204. will use the ISO OSI Reference Model as our framework:
  205.  
  206.     (1)    The physical layer is the same, i.e. radios, antennas,
  207.           and modems.
  208.  
  209.     (2)    The data link layer is again AX.25, but the Protocol ID
  210.           field of NET/ROM packets is set to a special NET/ROM ID.
  211.  
  212.     (3)    The network layer of NET/ROM handles the automatic
  213.           routing of packets to their destination.  A NET/ROM
  214.           network packet header contains the source and destination
  215.           callsigns of the NET/ROM endpoints.  There is no
  216.           information about the route the packet will travel to its
  217.           destination.  Instead, every node maintains a routing
  218.           table based on routing adjacencies:  it receives
  219.           broadcasts from other nodes which say, essentially, "I
  220.           am willing to take traffic for such-and-such a node." 
  221.           When a NET/ROM node receives a network packet, it
  222.           examines its routing table to see if anyone is willing
  223.           to pass it on toward its destination.  If so, it hands
  224.           off the packet to the next station.  If not, it simply
  225.           throws the packet away without comment.
  226.  
  227.         The type of network communications service (as opposed
  228.           to the routing techniques) used in NET/ROM (and IP) is
  229.           usually called an unreliable, connectionless datagram
  230.           layer, and the network layer packets are generally called
  231.           datagrams.  The service is unreliable, because it does
  232.           not guarantee or confirm ultimate delivery.  It is
  233.           connectionless, because no circuit is established over
  234.           which datagrams will travel.  (This contrasts with some
  235.           public data network protocols, where before data may be
  236.           sent to a remote system, a fixed path to that system must
  237.           be set up through the network, with resources
  238.           preallocated at every intervening node.  Each approach
  239.           has its advantages and adherents.)
  240.  
  241.     (4)    The transport layer of NET/ROM uses what is called a
  242.           sequenced packet protocol.  Unlike TCP, which delivers
  243.           an unsegmented stream of bytes to the receiver, and is
  244.           free to pack as many or as few bytes into each message
  245.           as it likes, the NET/ROM transport delivers a sequence
  246.           of packets.  The amount of data in these packets is
  247.           determined by the amount of data in the AX.25 packets the
  248.           NET/ROM user presents for transmission.  NET/ROM is not
  249.           free to combine packets together for greater efficiency,
  250.           although it can fragment and reassemble packets which are
  251.           too large to fit in one of its transport messages.
  252.  
  253.         The NET/ROM transport protocol provides end-to-end
  254.           delivery and acknowledgement, as well as demultiplexing
  255.           of arriving messages by circuit number.  A NET/ROM node
  256.           can be handling traffic for more than one circuit, or
  257.           connection, at a time, and it directs that traffic
  258.           internally by examining the circuit number field of the
  259.           transport header.
  260.  
  261.     (5)    The session layer is not present in NET/ROM.
  262.  
  263.     (6)    The presentation layer is not present in NET/ROM.
  264.  
  265.     (7)    The application layer is what a user sees when he or she
  266.           connects to a NET/ROM node.  It is responsible for
  267.           responding to user commands to list routes and nodes, and
  268.           establish connections.  "No layer 3" AX.25 packets
  269.           arriving at a NET/ROM node are shunted directly up to the
  270.           application layer, while "NET/ROM" PID packets are
  271.           forwarded up to the NET/ROM network layer.  This link
  272.           layer multiplexing should be familiar from our earlier
  273.           discussion.
  274.  
  275.  
  276. A full explanation of how the NET/ROM software works is beyond the
  277. scope of this paper.  The reader is referred to the NET/ROM manual
  278. for further details.
  279.  
  280.  
  281. NETWORK AND INTERNETWORK
  282.  
  283. Our presentation of the ISO OSI RM has been somewhat simplified. 
  284. In particular, the ISO recognizes a subdivision of Layer 3 into a
  285. Network Layer (3A) and an Internetwork Layer (3B).  Strictly
  286. speaking, the Internet Protocol (IP) is a 3B protocol, while the
  287. NET/ROM network service is a 3A protocol.  To put it somewhat
  288. crudely, IP is an Internetwork Layer because its messages can be
  289. routed through multiple logically and physically distinct networks. 
  290. The same cannot be said of X.25, for example, or of NET/ROM layer
  291. 3.  Our NET/ROM support in the KA9Q package reflects this
  292. distinction.
  293.  
  294. The KA9Q NET/ROM software is not a full NET/ROM implementation. 
  295. That was unnecessary for our purposes.  We didn't need the NET/ROM
  296. transport protocol, since our reliable end-to-end services are
  297. already provided by TCP.  We didn't need the application layer, for
  298. similar reasons.  What we did need was an existing network service
  299. that could carry our IP datagram traffic to remote destinations
  300. simply and easily.  The NET/ROM network layer was sufficient for
  301. this purpose.
  302.  
  303. We use the NET/ROM nodes as a datagram network.  When we have
  304. traffic to pass through a local NET/ROM, our software makes sure
  305. we have an AX.25 connection to that node, then puts a NET/ROM layer
  306. 3 header on our IP datagram and sends it off to the NET/ROM via an
  307. AX.25 packet with a protocol ID of NET/ROM.  The NET/ROM link layer
  308. sees the protocol ID and passes the packet to its network layer,
  309. which examines its routing table and passes the packet on to the
  310. appropriate neighboring NET/ROM.  This process continues until the
  311. packet arrives at the destination computer running the KA9Q
  312. software, where it is unwrapped and passed back up to the IP code.
  313.  
  314. At no point is the NET/ROM user interface or transport layer
  315. involved.  We do not have to issue CONNECT commands, or make use
  316. of NET/ROM virtual circuits in any way.  The NET/ROM nodes accept
  317. and pass our datagrams because they do not examine the contents of
  318. network datagrams not specifically addressed to them.  We are able
  319. to take advantage of the link-layer acknowledgements and automatic
  320. routing of the NET/ROM system without the overhead of its higher
  321. level services.
  322.  
  323.  
  324. SOFTWARE ARCHITECTURE
  325.  
  326. Let's examine how this is done in more detail.  Our once-simple
  327. protocol stack has grown a bit by now.  Let's have a look at it:
  328.  
  329.     (1)    The physical layer is basically unchanged (although we
  330.           did added another physical layer service, described
  331.           later).
  332.  
  333.     (2)    At the data link layer, we still have AX.25.  However,
  334.           the link layer now multiplexes three different kinds of
  335.           packets.  "No level 3" packets still go up the AX.25
  336.           session code, and IP packets will go directly up to layer
  337.           3B, but now we also direct packets with a NET/ROM PID to
  338.           the NET/ROM 3A routing layer.
  339.  
  340.     (3A)    Incoming packets with a NET/ROM PID go to the network
  341.           layer.  This is a full implementation of NET/ROM layer
  342.           3.  It has its own routing table, similar to that found
  343.           in any NET/ROM node.  It sends NODES broadcasts, which
  344.           update the routing tables of neighboring NET/ROM nodes,
  345.           and updates its own routing table on receipt of NODES
  346.           broadcasts from those neighbors.
  347.  
  348.         The NET/ROM layer examines incoming NET/ROM datagrams to
  349.           see if our station is their destination.  If the
  350.           datagrams are not for us, the routing table is examined
  351.           to see if we can forward them on to a neighboring node
  352.           for handling.  If we can, they are sent back down to the
  353.           link layer to continue their journey.  In other words,
  354.           a station running the KA9Q package with NET/ROM support
  355.           can act as a NET/ROM relay station.  As far as
  356.           neighboring NET/ROM nodes are concerned, they are simply
  357.           passing traffic on through another NET/ROM.
  358.  
  359.         If a NET/ROM datagram is for us, the network layer makes
  360.           sure that it isn't a NET/ROM transport packet.  If it is,
  361.           it is dropped.  If it isn't, it is sent up to layer 3B.
  362.  
  363.     (3B)    The internetwork layer contains the IP router and
  364.           protocol code.  (Remember that IP has its own routing
  365.           table and algorithms!).  It receives AX.25 traffic with
  366.           a protocol ID of IP, as well as IP datagrams arriving in
  367.           NET/ROM network datagrams.
  368.  
  369.  
  370. The remaining layers are the same as before, so we won't repeat
  371. them.
  372.  
  373.  
  374. IP ROUTING VIA NET/ROM
  375.  
  376. The IP routing table is similar, although not identical, to the one
  377. used for NET/ROM.  It contains two kinds of entries, which we will
  378. call local routes and gateway routes.
  379.  
  380. A local route consists of an IP address and an interface name.  The
  381. KA9Q software supports multiple interfaces, similar to the way that
  382. NET/ROM supports both a TNC's modem and its serial port.  One
  383. component of a route, both in NET/ROM and the KA9Q package, is the
  384. interface through which an outgoing datagram should pass.  (The
  385. main difference is that, while NET/ROM only supports AX.25 and two
  386. interfaces, the KA9Q code supports many different link layers and
  387. an almost unlimited number of interfaces.)  When a local route is
  388. found in the IP routing table, this means that the station with the
  389. given IP address is on the local subnet, which for packet radio
  390. purposes means that it is within radio communications range.  The
  391. datagram is forwarded to the link layer with an indication that
  392. direct delivery should be attempted.
  393.  
  394. A gateway route consists of an IP address, an interface name, and
  395. a gateway IP address.  When we encounter a gateway route, it means
  396. that the station in question is not on our local subnet (i.e. not
  397. within radio range), and must be reached via a relay station, or
  398. gateway.  (You will recall the idea of gateways from our earlier
  399. introduction of internetworking.)  The IP datagram is forwarded to
  400. the link layer with an indication that the message should be sent,
  401. not directly to its destination, but to the gateway station, which
  402. will make an attempt to reach the recipient, perhaps via another
  403. gateway.
  404.  
  405. When we added the NET/ROM support, we were concerned that it be
  406. fully transparent to the IP layer, both out of concern over proper
  407. design, and out of a desire to avoid any unnecessary rewrite of the
  408. existing code.  One key assumption in the KA9Q IP routing software
  409. is that of routing adjacency:  the IP layer makes the assumption
  410. that it can reach, via the interface given, some IP address
  411. mentioned in the route entry (either the recipient or the gateway). 
  412. However, we are using NET/ROM precisely because there is no IP
  413. station within radio range who can handle our traffic.  In order
  414. to maintain the adjacency assumption at the IP layer, we had to
  415. simulate the presence of an adjacent IP station in the NET/ROM
  416. code.
  417.  
  418. An IP route which uses the NET/ROM support looks just like any
  419. other routing table entry:  it consists of a destination, an
  420. interface, and an optional gateway.  The only difference is that
  421. the interface is called "Netrom", and it's not a link layer
  422. interface at all, although it appears that way to the IP routing
  423. code.  When the IP layer sends a datagram down to the NET/ROM
  424. "interface" for handling, it is actually calling a small stub
  425. routine above the NET/ROM routing code.  This stub looks up the IP
  426. address in a table which associates IP addresses, used at the IP
  427. layer and above, with AX.25 callsigns, used by NET/ROM's network
  428. layer.  If it finds an entry for the given IP address, it creates
  429. a NET/ROM network layer datagram header with a destination address
  430. set to the AX.25 callsign found in the association table, prepends
  431. this header to the IP datagram, and hands it off to the NET/ROM
  432. routing code.
  433.  
  434. The NET/ROM routing software now handles the datagram exactly as
  435. it would any NET/ROM traffic coming in from outside:  it checks to
  436. see if there is an entry for the destination AX.25 callsign in its
  437. routing table.  If there is, it opens a link layer (AX.25)
  438. connection to the neighboring NET/ROM node advertising the best
  439. quality route, and forwards the message into the NET/ROM network,
  440. to be delivered (ultimately) to the station whose AX.25 address is
  441. that in the destination field of the NET/ROM network header, and
  442. whose IP address was that of the destination or gateway in the IP
  443. routing table entry.
  444.  
  445. This approach was extremely successful.  Not one line of code
  446. needed to be changed in the IP routing code of the original KA9Q
  447. package.
  448.  
  449.  
  450. FEATURES TO SUPPORT NET/ROM PACKET SWITCHING
  451.  
  452. As implied above, the KA9Q package allows an almost unlimited
  453. number of interfaces to be used for receiving and forwarding
  454. packets.  At the IP layer, datagrams are routed from interface to
  455. interface using information from the IP routing table.  We added
  456. a similar functionality to the NET/ROM routing layer, allowing it
  457. to receive and send NET/ROM traffic on any AX.25 interface it is
  458. configured to use.  This feature allows the KA9Q software with
  459. NET/ROM support to be used as a multi-port full duplex NET/ROM
  460. packet switch, using standard TNCs or modem boards available for
  461. the IBM PC.  This is vastly superior to the practice of wiring
  462. together several NET/ROM TNCs with a diode bridge.  There is no
  463. possibility of collisions, since each TNC has its own serial port
  464. or bus address, so the interfaces can all run at full duplex, full
  465. speed through the switch.  In addition, this arrangement can be
  466. used with the high-speed interfaces and modems now becoming
  467. available, far exceeding the capabilities of a standard TNC.
  468.  
  469. In several places in the United States, excess bandwidth on
  470. commercial data links is being used to carry NET/ROM traffic. 
  471. These "wormhole" links work fairly well when there is only one
  472. NET/ROM at each end, but their performance degrades quickly if more
  473. are added.  Beyond the difficulties inherent in the diode bridging
  474. scheme shown in the NET/ROM manual, there is an additional problem
  475. not amenable to a simple hardware solution.  Most of the data links
  476. being used are running through time-domain or statistical
  477. multiplexing hardware, or through public data networks.  While all
  478. of these provide some kind of carrier detect indication, in almost
  479. every case that indication comes far too late to avoid collisions. 
  480. Carrier sense simply doesn't work, since the carrier indication
  481. isn't there when it is needed, and arrives just in time to cause
  482. unnecessary delays afterwards.  Performance of such an arrangement
  483. is likely to degrade to below that of schemes using no carrier
  484. sense at all.
  485.  
  486. NET/ROM nodes use a simple serial framing method to communicate
  487. with each other over their serial ports.  We have added support for
  488. this framing method alongside the "KISS" protocol which the KA9Q
  489. package normally uses to communicate with TNCs.  It is possible to
  490. plug a number of NET/ROM TNCs directly into the serial ports of an
  491. IBM PC, and use the PC as a switch.  Some of those NET/ROM TNCs can
  492. be at the ends of "wormhole" links.  These links can run at full
  493. duplex with no collisions, thus getting maximum performance and
  494. almost zero retries (assuming reliable data lines and serial
  495. interface hardware).  The NET/ROM serial interface code is
  496. instrumented to provide statistics on traffic volume and error
  497. rates on its serial ports.
  498.  
  499.  
  500. LESSONS LEARNED
  501.  
  502. The creation of the NET/ROM code has provided some interesting
  503. lessons on how we should and should not go about building amateur
  504. packet networks.  One of these lessons became apparent before we
  505. even thought of writing the NET/ROM code.
  506.  
  507. We would probably not even have added the NET/ROM layer three
  508. support to the KA9Q package had there been an easier way to
  509. accomplish what we wanted, which was to use NET/ROM networks to
  510. handle our IP traffic until we could build our own IP network. 
  511. Unfortunately, the NET/ROM software has a rather unfriendly link
  512. layer multiplexor.  It sends "no layer 3" packets to the
  513. application layer, and "NET/ROM" packets to the NET/ROM network
  514. layer, but anything else it consigns to oblivion.  We could have
  515. built fairly simple code to establish connections and send our IP
  516. traffic over NET/ROM transport circuits, but any packet with a
  517. protocol ID of "IP" was simply dropped by the NET/ROM software. 
  518. So, lesson number one:
  519.  
  520.      If you're going to build a networking product, write the
  521.      multiplexing code to be inclusive, rather than exclusive. 
  522.      In other words, if you get something with an unfamiliar
  523.      protocol ID, wrap it up and send it on, remembering to
  524.      regenerate the PID properly on the other end. 
  525.  
  526.  
  527. Another problem we encountered was the lack of a protocol ID field
  528. in the NET/ROM network layer header.  Both AX.25 packet headers and
  529. IP datagram headers contain a field which indicates what sort of
  530. higher level protocol stuff is packaged inside.  This is not unlike
  531. the cans on your grocer's shelf:  without a label, you have a hard
  532. time telling the beets from the beans.  The AX.25 protocol ID field
  533. makes link layer multiplexing possible, and the protocol ID of an
  534. IP datagram header allows many higher level protocols to use its
  535. internetworking services.  Because the NET/ROM network header does
  536. not contain a protocol ID field, there is no straightforward way
  537. to put anything but a NET/ROM transport packet inside.  This is
  538. unwise.  The authors of NET/ROM may well have been unaware that
  539. anyone would ever attempt a project such as ours, but by leaving
  540. this feature out of their network layer, they made it difficult,
  541. if not impossible, to ever introduce other transport protocols into
  542. their product line.  So, lesson number two:
  543.  
  544.      Include a protocol ID field in your link and network
  545.      layer headers, even if you can't think of a use for it
  546.      yet.  Make it big enough to be useful, and offer to be
  547.      the repository of assigned PIDs, so that a standard
  548.      develops.
  549.  
  550.  
  551. In experimenting with the auto-routing code in our NET/ROM network
  552. implementation, we discovered something that is a common complaint
  553. among NET/ROM operators.  This can be summed up by the dictum,
  554. "Just because you can hear them, doesn't mean they can hear you." 
  555. It is not unusual to have neighboring nodes that are "alligators"
  556. (big mouth, tiny ears) or for your node to be a "rabbit" (big ears,
  557. tiny mouth).  Also, band openings on two meters happen quite often,
  558. and usually last just long enough for you to receive a routing
  559. broadcast from a station from whom you will never hear again - at
  560. least until the next band opening.  Either situation leaves your
  561. routing table cluttered with impossible routes, which can lead to
  562. repeated link-layer retries and transport layer failures.  Routes
  563. based on band openings age out fairly quickly.  Ones based on deaf
  564. neighbors come back, again and again.
  565.  
  566. After a bit of experience with this phenomenon, we added the
  567. "nodefilter" feature to our implementation.  The user may specify
  568. a list of nodes which are the only ones from which route broadcasts
  569. will be accepted, or alternately, may specify a "reject list" of
  570. nodes whose broadcasts will be routinely ignored.  The lesson:
  571.  
  572.      If your routing method involves broadcast in an
  573.      asymmetrical or inconsistent communications environment,
  574.      provide a way to restrict the routes accepted to those
  575.      offered by reliable nodes.
  576.  
  577.  
  578. The implementation described was actually the second one we did. 
  579. The first one grabbed AX.25 interfaces away from the IP part of the
  580. KA9Q code, and could only be used for NET/ROM and regular AX.25
  581. traffic.  This appeared to be a horrible idea from the moment the
  582. first version was completed, and prompted an immediate rewrite,
  583. producing a program that could act as a packet switch for IP as
  584. well as NET/ROM.  The lesson here (besides "look before you leap")
  585. is:
  586.  
  587.      If you're going to build a packet switch for amateur use,
  588.      support link layer multiplexing, and try to make it
  589.      multi-purpose.  This is a hobby, and the radios, tower
  590.      space, and dollars are in short supply.  The more stuff
  591.      you can do with a single one of each, the happier you
  592.      will be in the long run.
  593.  
  594.  
  595. EXPERIENCE
  596.  
  597. At this writing, experience with the software is necessarily
  598. limited.  It is only now being made an official part of the
  599. official KA9Q release (thanks, Phil!), so it has not been widely
  600. available as for as long as we would have wished.  Still, it has
  601. found its way into enough hands for us to have some preliminary
  602. measurements and impressions.
  603.  
  604. The Madison, Wisconsin NET/ROM node (MAD) is connected to a node
  605. (MQTA) in Marquette, in the Upper Peninsula of Michigan, via a
  606. multiplexed commercial data line.  We have conducted tests between
  607. W9NK, in Madison, and KV9P, in Alpha, Michigan.  Both stations sent
  608. periodic routing broadcasts to announce their presence to their
  609. local nodes.  The path chosen by NET/ROM was:
  610.  
  611.     W9NK <-> MAD <-> MQT <-> MQTA <-> IRN <-> KV9P
  612.  
  613. where MQTA and IRN were NET/ROM or TheNet nodes in Marquette and
  614. Iron Mountain, Michigan, respectively.  All nodes except the two
  615. using the data line were on two meters, with a speed of 1200 baud.
  616.  
  617. Performance was surprisingly good, with TCP round trip times
  618. settling in around 12 to 20 seconds, with a standard deviation of
  619. about nine seconds.  In spite of the number of hops, performance
  620. was good enough to hold fairly coherent keyboard-to-keyboard
  621. conversations.
  622.  
  623. We did note at least one case where duplicate copies of datagrams
  624. were delivered by the NET/ROM network.  Since TCP discards
  625. duplicates, this causes no problem in normal operations, but in the
  626. case we noticed it resulted in two replies to the same ICMP Echo
  627. Request message (produced by the ping command).
  628.  
  629. Feedback from other users, particularly N0AN in Iowa, illuminates
  630. a serious problem with the management of existing NET/ROM networks: 
  631. the routing tables of these networks are so inaccurate that many
  632. experienced users don't use the network layer facilities at all! 
  633. BBS mail forwarding scripts are set up to establish connections to
  634. the local NET/ROM node, request a transport connection to a
  635. selected neighbor, then from that neighbor to another, and so forth
  636. to the NET/ROM node in their destination area.  They have
  637. discovered that, without human intervention, many NET/ROM networks'
  638. routing facilities break down and become unusable.
  639.  
  640. This problem has some impact on normal operations, in the sense
  641. that these multiple transport sessions do not in any sense add up
  642. to end-to-end protocol support.  There is in fact no transport
  643. facility (as we understand the term) in use in these cases, since
  644. no acknowledgements travel from one end of the communications path
  645. to another.  There may as well be no transport layer in NET/ROM
  646. under these circumstances; the overhead would at least be
  647. substantially lower, with no additional loss of reliability.
  648.  
  649. Unfortunately, networks in such a pathological state are unusable
  650. by our TCP/IP software.  Since we make no use of the NET/ROM
  651. transport layer, we must rely entirely on the accuracy of the
  652. network layer routing tables to support the forwarding of our
  653. packets to their destinations.  If these tables are not correct,
  654. our traffic will not get through.
  655.  
  656. The good news is that, in some areas where the NET/ROM operators
  657. are also working with TCP/IP, this problem is forcing them to pay
  658. attention to the quality of their routing tables.  As we have noted
  659. above, NET/ROM is somewhat short on facilities to do this, but a
  660. few things can be and are being done with the tools available.  One
  661. side-effect of the TCP/IP NET/ROM support may be an improvement in
  662. quality of service to all NET/ROM users!
  663.  
  664.  
  665. FUTURE DEVELOPMENT
  666.  
  667. We hope, at some point, to produce a version of this support that
  668. can be put into ROM and used in a dedicated packet switch for
  669. hostile environments.  Such a switch would allow us to begin
  670. building IP networks, while also offering superior performance to
  671. the NET/ROM community.  It is our hope that the two user
  672. communities can work together, sharing resources to build a better
  673. network than either could alone.
  674.  
  675.  
  676. ACKNOWLEDGEMENTS
  677.  
  678. Sincere thanks are due to Phil Karn, KA9Q, who would have been rich
  679. (or at least, richer) by now if he hadn't been dedicated to
  680. improving the state of the art for all radio amateurs.  Also,
  681. thanks to everyone on the tcp-group mailing list, who contributed
  682. helpful comments during the design and development of the NET/ROM
  683. code.  Special thanks also to Howard Leadmon, WB3FFV, and John
  684. Limpert, N3DMC, who got it to compile under Unix.
  685.  
  686. Individuals who helped test or provided feedback on experience with
  687. the software were:  Duane Brummel, NX9K; Hasan Schiers, N0AN; and
  688. Dave Reinhart, KV9P.
  689.  
  690. Phil Karn, KA9Q, reviewed the first draft of this paper, providing
  691. many helpful comments and suggestions.
  692.